home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 4 / United Public Domain Gold 4.iso / fredfish / ff.0164.dms / ff.0164.adf / PcView / VIEW.H < prev    next >
Text File  |  1988-11-22  |  2KB  |  65 lines

  1. /* View.h - View.C support file (PC version) : (c) 1988 DJH */
  2.  
  3. #define TITLE "Pc-View 2.1 : (c) 1988 John Hodgson\n"
  4.  
  5. #define LOWIDTH  320 /* max lores width */
  6. #define LOHEIGHT 200 /* max non-interlaced height */
  7. #define MAXPLANES 8  /* max # planes support (VGA!) */
  8. #define MAXCLRS  (1<<MAXPLANES) /* max # colors supported (VGA!) */
  9.  
  10. #define LINELEN  (1024/8) /* arbitrary max line buffer length */
  11.  
  12. /* Since Intel chips store their constants in reverse order, this MakeID
  13.    builds its constants in reverse order so the Motorola constants will
  14.    match even after being read into Intel machines. */
  15.  
  16. #define MakeID(a,b,c,d) ((long)d<<24 | (long)c<<16 | b<<8 | a)
  17.  
  18. #define ID_FORM MakeID('F','O','R','M')
  19. #define ID_ILBM MakeID('I','L','B','M')
  20. #define ID_BMHD MakeID('B','M','H','D')
  21. #define ID_CAMG MakeID('C','A','M','G')
  22. #define ID_CMAP MakeID('C','M','A','P')
  23. #define ID_BODY MakeID('B','O','D','Y')
  24.  
  25. #define cmpByteRun1 1
  26.  
  27. #define ROUNDODDUP(a) (((a)+1)&(~1L))
  28.  
  29. enum colors { RGB_RED,RGB_GREEN,RGB_BLUE };
  30.  
  31. /* masking types */
  32.  
  33. #define mskNone 0
  34. #define mskHasMask 1
  35. #define mskHasTransparentColor 2
  36. #define mskLasso 3
  37.  
  38. typedef struct {
  39.   long ckID,ckSize;
  40. } Chunk;
  41.  
  42. typedef struct {
  43.   short w,h,x,y;
  44.   char  nPlanes,masking,compression,pad1;
  45.   short transparentColor;
  46.   char  xAspect, yAspect;
  47.   short pageWidth,pageHeight;
  48. } BitMapHeader;
  49.  
  50. /* Non-IFF related structures */
  51.  
  52. #define TRUE 1
  53.  
  54. struct Screen {
  55.   short width,
  56.         height,
  57.     compression,
  58.     mask,
  59.     planes,
  60.     colors;
  61.   long ViewModes;
  62.   unsigned char colormap[MAXCLRS][3],
  63.         huge *buffer;
  64. };
  65.